Character Strings

A string is any collection of characters enclosed in quotes, such as "Now Boarding." Unlike some programming languages, ProModel uses character strings exclusively for output either to a file or to the screen. Strings may contain any of the 256 ASCII characters. (ASCII characters not on the keyboard can be included in string expressions with the CHAR() function.) Strings may include keywords and names, but those keywords and names will not be executed in or used by the logic.

Additionally, the symbol "\n" can be used to divide a string into multiple lines when it is output, as in the example below.

The statement, DISPLAY "The simulation \nis half over." displays this dialog box:

 

Examples of character strings

"EntA exited the system."

"Location 3 is operating at capacity."

"ProModel"

Although ProModel does not provide string variables, it does allow the names of model elements to be stored in variables and attributes as name-index numbers (see Name-Index Numbers). The name referenced by a name-index number may be used in statements and output to the screen or a file with the ENT(), LOC(), and RES() functions. See String Expressions for more information.